package vip.xiaonuo.invoice.core.enums.invoice;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 发票平台枚举
 *
 * @author AI Assistant
 */
@Getter
@AllArgsConstructor
public enum InvoicePlatformEnum {

    /** 数族发票平台 */
    SHUZU("SHUZU", "数族"),

    /** 诺诺发票平台 */
    NUONUO("NUONUO", "诺诺");

    /** 平台编码 */
    private final String code;

    /** 平台名称 */
    private final String name;


    /**
     * 根据编码获取枚举
     */
    public static InvoicePlatformEnum getByCode(String code) {
        for (InvoicePlatformEnum platform : values()) {
            if (platform.getCode().equals(code)) {
                return platform;
            }
        }
        return null;
    }
}
